from core.basehandler import BaseHandler
from core.room import Room
from items.frenchkiss import FrenchKiss
from items.hiphop import HipHop
from core.action import Action


class College(Room):
    def __init__(self, room_id):
        Room.__init__(self, room_id)    # do basic initialization for every room
        
        # add inventory items
        self.add_item(FrenchKiss())
        self.add_item(HipHop())
        
        # build list of actions
        self.add_action(GoSalon)
        self.add_action(GoProposal)
    
    # return description of room.
    def get_description(self):
        return '''
        You love learning new things.  \n
        You drop into the local community college and find there are two classes being offered this very minute.  \n  
        Which one should you take?
        '''
    # return image of room
    def get_image(self):
        return 'dancefail.jpg'


class CollegeHandler(BaseHandler):
    
    # return class to use to create a new instance of this room
    def get_room_class(self):
        return College

# define actions for this room

    def get_FrenchKiss(self):
        return 'FunnyFrenchKiss.jpg'

    def get_HipHop(self):
        return 'dancefail.jpg'

class GoSalon(Action):
    def __init__(self):
        Action.__init__(self, "Go to the salon")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Go Back"
    
    # set cutscene for when arrive in entrance_hall
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'salon'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"
    
class GoProposal(Action):
    def __init__(self):
        Action.__init__(self, "Proposal")    # do basic initialization for every action
    
    # return description of action (used in label on webpage)
    def get_description(self):
        return "Ask Velma out"
    
    # return id of room to enter when action is complete
    def get_destination(self):
        return 'proposal'
    
    # return http method to use when user clicks on this action
    # use "get" if just moving to another room.  if changing something
    # like the state of an inventory item or room then use "post"
    def get_method(self):
        return "get"